<form class="layui-form layui-form-pamel" name="form1" id="form1" method="post">
    <div class="searchbox demoTable" id="searchbox">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">安装地址：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" maxlength="50" name="address" id="address"
                           placeholder="请输入安装地址"/>
                </div>
            </div>

            <input type="button" value="查询" onclick="$.table.search()" class="layui-btn layui-btn-red"/>
        </div>
    </div>
</form>

<div style="overflow:auto;width: 100%;padding-bottom: 20px;">
    <table id="simple-table" class="layui-table" lay-filter="simple-table">
    </table>
    <script type="text/html" id="barTable">
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="detailsFlag" title="详情">详情</a>
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="editFlag" title="编辑">编辑</a>
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="delFlag" title="删除">删除</a>
    </script>

    <script type="text/html" id="toolbarTable">
        <div class="layui-inline" title="添加" lay-event="addFlag"><i class="layui-icon layui-icon-add-circle"></i></div>
        <div class="layui-inline" title="导出" lay-event="exportExcel"><i class="layui-icon layui-icon-export"></i></div>
    </script>
</div>


<script type="text/javascript">

    var prefix = basePath + "device/station";

    var options = {
        id: 'simple-table',
        url: prefix + '/uStationlistPage',
        javaField: 'id',    //主键
        addUrl: prefix + '/addUStation',   //添加
        deleteUrl: prefix + '/deleteUStation',    //删除
        editUrl: prefix + '/toEditUStation?id=',   //编辑
        exportUrl: prefix + '/exportUStation',    //导出
        importTemplate: prefix + '/impTempUStation',   //下载导入模板
        importTemplateUrl: prefix + '/impTempUStationUrl',    //导入
        addFull: false, //弹出框最大化
        editFull: false, //弹出框最大化
        height: 650,  //开启头部工具栏右侧
        toolbar: '#toolbarTable',  //开启工具栏
        modalName: '井下分站',
        cols: [[
            {type: 'numbers', title: '序号', width: 50}
            , {field: 'id', title: 'id'}
            , {field: 'address', title: '安装地址'}
            , {field: 'code', title: '编号'}
            , {field: 'idmine', title: '所属矿'}
            , {field: 'commbegin', title: '通讯开始时间'}
            , {field: 'comport', title: '串口/端口号'}
            , {field: 'gisY', title: '纬度'}
            , {field: 'gisuse', title: '地图显示'}
            , {field: 'stationtype', title: '分站类型'}
            , {field: 'stationId', title: '分站站号'}
            , {field: 'groupId', title: '机构号'}
            , {field: 'commend', title: '通讯结束时间'}
            , {field: 'commstate', title: '通讯状态'}
            , {field: 'ip', title: 'IP地址'}
            , {field: 'gisX', title: '经度'}
            , {field: 'state', title: '状态'}
            , {title: '操作', width: 178, align: 'center', toolbar: '#barTable'}
        ]],
        page: true
    };

    var init = $.table.init(options);

</script>
